home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Small Eiffel 0.4.8 / misc / pointemacs < prev    next >
Lisp/Scheme  |  1997-04-13  |  5KB  |  226 lines

  1. ; .emacs -- Joel Faedi (1994/09/23) 
  2. ;
  3. ; Joel.Faedi@scinfo.u-nancy.fr
  4. ;
  5. ; =======================================
  6.  
  7.  
  8. ; Les chemins de recherche des macros Lisp
  9. ;   ==> notez le append pour ajouter a la 
  10. ;       liste des `path'
  11. ; ----------------------------------------
  12.  
  13. ;(setq load-path
  14. ;      (append 
  15. ;       '("/mon/chemin/a/moi")
  16. ;       load-path
  17. ;     ))
  18.  
  19.  
  20. ; le mode par defaut
  21. ; ------------------
  22.  
  23. (setq default-major-mode 'text-mode)
  24.  
  25.  
  26. ; Les AUTO FILL MODE
  27. ; ------------------
  28.  
  29. (setq save-buffer-context t)
  30. (setq mail-mode-hook '(lambda () (auto-fill-mode 1)))
  31. (setq auto-save-and-recover-context t)
  32.  
  33.  
  34. ; LES AUTOLOAD
  35. ; ------------
  36.  
  37. (setq default-major-mode 'text-mode)
  38.  
  39.  
  40. ; ********** pour le mode Eiffel 
  41.  
  42. (autoload 'eiffel-mode "eiffel" "Mode for Eiffel programs" t nil)
  43.  
  44.  
  45. ; ********** pour le mode Tar
  46.  
  47. (autoload 'tar-mode "tar-mode" "mode Tar" t nil)
  48.  
  49.  
  50. ; Associations entre modes et suffixes
  51. ; ------------------------------------
  52.  
  53. (setq
  54.   auto-mode-alist
  55.   '(("\\.text$" . text-mode)
  56.     ("\\.txt$" . text-mode)
  57.     ("\\.letter$" . text-mode)
  58.     ("^/tmp/Re" . text-mode)
  59.     ("^/tmp/fol/" . text-mode)
  60.     ("/Message[0-9]*$" . text-mode)
  61.     ("\\.e$" . eiffel-mode)
  62.     ("\\.c$" . c-mode)
  63.     ("\\.h$" . c-mode)
  64.     ("\\.cc$" . c++-mode)
  65.     ("\\.hh$" . c++-mode)
  66.     ("\\.lex$" . c-mode)
  67.     ("\\.yacc$" . c-mode)
  68.     ("\\.html$" . html-mode)
  69.     ("\\.s$" . asm-mode)
  70.     ("\\.mp$". idem-mode)
  71.     ("\\.el$" . emacs-lisp-mode)
  72.     ("/\\..*emacs" . emacs-lisp-mode)
  73.     ("\\.l$" . lisp-mode)
  74.     ("\\.ll$" . lisp-mode)
  75.     ("\\.lisp$" . lisp-mode)
  76.     ("\\.lsp$" . lisp-mode)
  77.     ("\\.texinfo$" . texinfo-mode)
  78.     ("\\.texi$" . texinfo-mode)
  79.     ("\\.tar$" . tar-mode)
  80.    ))
  81.  
  82.  
  83. ; Suffixes a ignorer
  84. ; ------------------
  85.  
  86.  
  87. (setq completion-ignored-extensions  '(".o" ".elc" "~" ".bin" ".lbin" ".dvi"
  88.                                             ".toc" ".abv" ".x"
  89.                                             ".log" ".aux" ".lof"
  90.                                             ".blg" ".bbl" ".glo"
  91.                                             ".idx" ".lot" ".lo"
  92.                                             ".usl" ".hsl"))
  93.  
  94.  
  95. ; Les clefs (associations touche-fonction)
  96. ; ----------------------------------------
  97.  
  98.  
  99. ; "ESC I" ou "CTRL-X <Espace>" pour passer en mode sur-impression 
  100. ; et insertion (en bascule)
  101. (global-set-key "\M-I" 'overwrite-mode)
  102. (global-set-key "\M-i" 'overwrite-mode)
  103. (global-set-key "\C-x " 'overwrite-mode)
  104.  
  105.  
  106. ; "ESC $" pour verifier l'orthographe anglaise du buffer
  107. (global-set-key "\M-$" 'spell-buffer)
  108.  
  109.  
  110. ; "CTRL-X CTRL-Z" pour agrandir la fenetre
  111. (global-set-key "\C-x\C-z" 'enlarge-window)
  112.  
  113.  
  114. ; "CTRL-X =" pour aller a la ligne de numero donne
  115. (global-set-key "\C-x=" 'goto-line)
  116.  
  117.  
  118. ; "CTRL-X ?" : numero de la ligne courante ?
  119. (global-set-key "\C-x?" 'what-line)
  120.  
  121.  
  122. ; suppression de "CTRL-X CTRL-L" 
  123. (global-unset-key "\C-x\C-l")
  124.  
  125.  
  126. ; suppression de CTRL-X f
  127. ;(global-unset-key "\C-xf")
  128.  
  129.  
  130. ; "CTRL-X >" pour envoyer un mail 
  131. (global-set-key "\C-x<" 'rmail)
  132.  
  133.  
  134. ; "CTRL-X <" pour lire son mail
  135. (global-set-key "\C-x>" 'mail-other-window)
  136.  
  137.  
  138. ; "Back space" qui efface 
  139. (global-set-key "\C-h" 'delete-backward-char) 
  140.  
  141.  
  142. ; "ESC ?" pour obtenir la doc emacs
  143. (global-set-key "\M-?" 'help-for-help)
  144.  
  145.  
  146.  
  147. ; Pour les consoles alphanumeriques HP
  148. ; ------------------------------------
  149.  
  150. ; les fleches
  151. (global-set-key "\M-C" 'forward-char) 
  152. (global-set-key "\M-B" 'next-line) 
  153. (global-set-key "\M-A" 'previous-line) 
  154. (global-set-key "\M-D" 'backward-char)
  155.  
  156.  
  157. ; "Next" pour aller a la page suivante, "Prev" pour la precedente
  158. (global-set-key "\C-[V" 'scroll-down)
  159. (global-set-key "\C-[U" 'scroll-up)
  160.  
  161.  
  162. ; "Scroll Up" pour aller au debut de la ligne, "Scroll Down" a la fin 
  163. (global-set-key "\C-[T" 'beginning-of-line)
  164. (global-set-key "\C-[S" 'end-of-line)
  165.  
  166.  
  167. ; "Delete Char" pour DEL, et "Delete Line" pour C-K
  168. (global-set-key "\C-[P" 'delete-char)
  169. (global-set-key "\C-[M" 'kill-line)
  170.  
  171.  
  172. ; "Fleche inclinee" debut de fichier, "SHIFT + Fleche" fin du fichier 
  173. (global-set-key "\C-[h" 'beginning-of-buffer)
  174. (global-set-key "\C-[F" 'end-of-buffer)
  175.  
  176.  
  177. ; "Clear Display" pour RAZ ecran
  178. (global-set-key "\C-[J" 'recenter)
  179.  
  180.  
  181. ; SHIFT + "Delete Char" pour 'UNDO' (= CTRL-_ )
  182. (global-set-key "\C-[O" 'undo)
  183.  
  184.  
  185. ; "Insert Char" pour marquer (= CTRL-@ ) 
  186. (global-set-key "\C-[Q" 'set-mark-command)
  187.  
  188.  
  189. ; SHIFT + "Insert char" pour copier sans couper (= ESC w )
  190. (global-set-key "\C-[N" 'copy-region-as-kill)
  191.  
  192.  
  193. ; "Insert Line" pour inserer le texte copier (= CTRL-Y ) 
  194. (global-set-key "\C-[L" 'yank)
  195.  
  196.  
  197. ; "ESC ." pour basculer 80/132 colonnes sur consoles alpha
  198. (defun switch-width ()
  199.   "Echange mode 80-132 colonnes"
  200.   (interactive)
  201.   ( if (= (screen-width) 80)
  202.       ( set-screen-width 132 )
  203.     ( set-screen-width 80 ))
  204.   )
  205.  
  206. ( global-set-key "\M-." 'switch-width)
  207.  
  208.  
  209.  
  210. ; Les variables
  211. ; -------------
  212.  
  213. ; majuscules et minuscules equivalentes dans les recherches
  214. (setq-default case-fold-search t)
  215.  
  216.  
  217. ; Pas de messages au debut
  218. ; ------------------------
  219.  
  220. (setq inhibit-startup-message t)
  221. (put 'eval-expression 'disabled nil)
  222.  
  223.  
  224. ; fin
  225.  
  226.